package com.wsl.Controller;

import com.wsl.Entity.Person;
import com.wsl.Service.DemoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author:WangShuliang
 * @Description:
 * @Date:Created in 16:47 2017/11/29
 * @Modified by:
 */
@RestController
public class CacheController {
    @Autowired
    DemoService demoService;
    @RequestMapping("/put")
    public Person put(Person person){
        return demoService.save(person);
    }
    @RequestMapping("/able")
    public Person cacheble(Person person){
        return demoService.findOne(person);
    }
}